package com.example.java_chatroom.mapper;

import com.example.java_chatroom.model.FriendInfo;
import com.example.java_chatroom.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FriendInfoMapper {

   List<FriendInfo> selectFriendList(int userId);
   Integer insertFriend(Integer userId, Integer userId1);

   FriendInfo getFriend(String friendName);

   List<FriendInfo> getOtherFriendList(UserInfo userInfo, List<FriendInfo> friendInfos);

   List<FriendInfo> getGroupList(Integer sessionId);

   void deleteFriendByUserId(Integer userId);

   void deleteFriend1ByUserId(Integer userId);

   void deleteFriendByUserIdAndfriendId(Integer friendId, Integer userId);

   Integer queryFriendByFriendAndUserId(Integer friendId, Integer userId);
}
